package algorithm.heap;

import java.util.Random;

/**堆排序
 * @author bingo
 * @create 2018-02-25 9:15
 **/
public class HeapSort {

    public static void main(String[] args) {
        MaxHeap maxHeap = new MaxHeap(50);
        Random random = new Random();
        for(int i=0;i<50;i++){
         maxHeap.insert(random.nextInt(100));
        }
        for(int j=0;j<50;j++){
            System.out.println(maxHeap.push());
        }
    }
}
